//
//  UIView+My.m
//  Tsc_IOS
//
//  Created by Rio on 15-6-11.
//  Copyright (c) 2015年 idream. All rights reserved.
//

#import "UIView+My.h"
#import  <objc/runtime.h>

static const void *MyTagKey = &MyTagKey;

@implementation UIView (My)

// 添加动态属性
@dynamic myTag;

- (NSObject *)myTag {
     return objc_getAssociatedObject(self, MyTagKey);
}

- (void) setMyTag:(NSObject *)myTag {
     objc_setAssociatedObject(self, MyTagKey, myTag, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end
